﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using DataContext;

namespace BusinessLogic
{
	public class AccessoryBusiness
    {
        #region Field
        AccessoryContext accessoryContext = new AccessoryContext();
        #endregion

        #region Constructors
        public AccessoryBusiness() {}
		#endregion

		#region Business Methods
        /// <summary>
        /// Tìm kiếm phụ kiện
        /// </summary>
        /// <param name="text"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        public DataTable Search(string text, int currentPage, int pageSize, ref int totalRecord)
        {
            try
            {
                return accessoryContext.Search(text, currentPage, pageSize, ref totalRecord);
            }
            catch (System.Exception)
            {
                return null;
            }
        }
		#endregion
	}
}
